import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { UserModule } from './user/user.module';
import { DbModule } from './db/db.module';
import { ApAntModule } from './ap_ant/ap_ant.module';
import { OtaModule } from './ota/ota.module';
import { ApEphModule } from './ap_eph/ap_eph.module';
import { ApNetModule } from './ap_net/ap_net.module';
import { RemoteControlModule } from './remote-control/remote-control.module';
import { ApLogModule } from './ap_log/ap_log.module';
import { ApSystemModule } from './ap_system/ap_system.module';
import { HomeModule } from './home/home.module';
import { ServeStaticModule } from '@nestjs/serve-static';
import { join } from 'path';
import { ApSyncModule } from './ap_sync/ap_sync.module';
import { ApConfigModule } from './ap_config/ap_config.module';
import { ApVtModule } from './ap_vt/ap_vt.module';
import { ApSatelliteModule } from './ap_satellite/ap_satellite.module';
import { ApLicenseModule } from './ap_license/ap_license.module';
import { WebsocketModule } from './websocket/websocket.module';
import { Websocket2Module } from './websocket2/websocket2.module';
import { ApHwModule } from './ap_hw/ap_hw.module';
import { ApWebModule } from './ap_web/ap_web.module';
import { ApDevinfoModule } from './ap_devinfo/ap_devinfo.module';
import { ApDeviceModule } from './ap_device/ap_device.module';
import { ApCpModule } from './ap_cp/ap_cp.module';
@Module({
  imports: [UserModule, DbModule, ApAntModule, OtaModule, ApEphModule, ApNetModule, RemoteControlModule, ApLogModule, ApSystemModule, HomeModule, 
    ServeStaticModule.forRoot({
      rootPath: join(__dirname, '..', 'public'), 
      serveRoot: '/public', 
    }),  
    ApSyncModule,
    ApConfigModule,
    ApConfigModule,
    ApVtModule,
    ApSatelliteModule,
    ApLicenseModule,
    WebsocketModule,
    // Websocket2Module,
    ApHwModule,
    ApWebModule,
    ApDevinfoModule,
    ApDeviceModule,
    ApCpModule,
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
